import 'package:enterprise_v6_app/generated/json/base/json_convert_content.dart';
import 'package:enterprise_v6_app/app/data/entities/application/standardiztion/standard_home_risk_analysis_entity.dart';

StandardHomeRiskAnalysisEntity $StandardHomeRiskAnalysisEntityFromJson(Map<String, dynamic> json) {
  final StandardHomeRiskAnalysisEntity standardHomeRiskAnalysisEntity = StandardHomeRiskAnalysisEntity();
  final String? companyName = jsonConvert.convert<String>(json['companyName']);
  if (companyName != null) {
    standardHomeRiskAnalysisEntity.companyName = companyName;
  }
  final int? emergencyPlanCount = jsonConvert.convert<int>(json['emergencyPlanCount']);
  if (emergencyPlanCount != null) {
    standardHomeRiskAnalysisEntity.emergencyPlanCount = emergencyPlanCount;
  }
  final int? initialRiskFour = jsonConvert.convert<int>(json['initialRiskFour']);
  if (initialRiskFour != null) {
    standardHomeRiskAnalysisEntity.initialRiskFour = initialRiskFour;
  }
  final int? initialRiskOne = jsonConvert.convert<int>(json['initialRiskOne']);
  if (initialRiskOne != null) {
    standardHomeRiskAnalysisEntity.initialRiskOne = initialRiskOne;
  }
  final int? initialRiskThree = jsonConvert.convert<int>(json['initialRiskThree']);
  if (initialRiskThree != null) {
    standardHomeRiskAnalysisEntity.initialRiskThree = initialRiskThree;
  }
  final int? initialRiskTwo = jsonConvert.convert<int>(json['initialRiskTwo']);
  if (initialRiskTwo != null) {
    standardHomeRiskAnalysisEntity.initialRiskTwo = initialRiskTwo;
  }
  final int? riskFour = jsonConvert.convert<int>(json['riskFour']);
  if (riskFour != null) {
    standardHomeRiskAnalysisEntity.riskFour = riskFour;
  }
  final int? riskMeasuresCount = jsonConvert.convert<int>(json['riskMeasuresCount']);
  if (riskMeasuresCount != null) {
    standardHomeRiskAnalysisEntity.riskMeasuresCount = riskMeasuresCount;
  }
  final int? riskOne = jsonConvert.convert<int>(json['riskOne']);
  if (riskOne != null) {
    standardHomeRiskAnalysisEntity.riskOne = riskOne;
  }
  final int? riskThree = jsonConvert.convert<int>(json['riskThree']);
  if (riskThree != null) {
    standardHomeRiskAnalysisEntity.riskThree = riskThree;
  }
  final int? riskTwo = jsonConvert.convert<int>(json['riskTwo']);
  if (riskTwo != null) {
    standardHomeRiskAnalysisEntity.riskTwo = riskTwo;
  }
  final int? safetyTrainingCount = jsonConvert.convert<int>(json['safetyTrainingCount']);
  if (safetyTrainingCount != null) {
    standardHomeRiskAnalysisEntity.safetyTrainingCount = safetyTrainingCount;
  }
  final int? total = jsonConvert.convert<int>(json['total']);
  if (total != null) {
    standardHomeRiskAnalysisEntity.total = total;
  }
  return standardHomeRiskAnalysisEntity;
}

Map<String, dynamic> $StandardHomeRiskAnalysisEntityToJson(StandardHomeRiskAnalysisEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['companyName'] = entity.companyName;
  data['emergencyPlanCount'] = entity.emergencyPlanCount;
  data['initialRiskFour'] = entity.initialRiskFour;
  data['initialRiskOne'] = entity.initialRiskOne;
  data['initialRiskThree'] = entity.initialRiskThree;
  data['initialRiskTwo'] = entity.initialRiskTwo;
  data['riskFour'] = entity.riskFour;
  data['riskMeasuresCount'] = entity.riskMeasuresCount;
  data['riskOne'] = entity.riskOne;
  data['riskThree'] = entity.riskThree;
  data['riskTwo'] = entity.riskTwo;
  data['safetyTrainingCount'] = entity.safetyTrainingCount;
  data['total'] = entity.total;
  return data;
}

extension StandardHomeRiskAnalysisEntityExtension on StandardHomeRiskAnalysisEntity {
  StandardHomeRiskAnalysisEntity copyWith({
    String? companyName,
    int? emergencyPlanCount,
    int? initialRiskFour,
    int? initialRiskOne,
    int? initialRiskThree,
    int? initialRiskTwo,
    int? riskFour,
    int? riskMeasuresCount,
    int? riskOne,
    int? riskThree,
    int? riskTwo,
    int? safetyTrainingCount,
    int? total,
  }) {
    return StandardHomeRiskAnalysisEntity()
      ..companyName = companyName ?? this.companyName
      ..emergencyPlanCount = emergencyPlanCount ?? this.emergencyPlanCount
      ..initialRiskFour = initialRiskFour ?? this.initialRiskFour
      ..initialRiskOne = initialRiskOne ?? this.initialRiskOne
      ..initialRiskThree = initialRiskThree ?? this.initialRiskThree
      ..initialRiskTwo = initialRiskTwo ?? this.initialRiskTwo
      ..riskFour = riskFour ?? this.riskFour
      ..riskMeasuresCount = riskMeasuresCount ?? this.riskMeasuresCount
      ..riskOne = riskOne ?? this.riskOne
      ..riskThree = riskThree ?? this.riskThree
      ..riskTwo = riskTwo ?? this.riskTwo
      ..safetyTrainingCount = safetyTrainingCount ?? this.safetyTrainingCount
      ..total = total ?? this.total;
  }
}
